htmlレンダリング: intro
code: examples/playground/src/main.ts
import { createApp } from 'vue'
const app = createApp({
render() {
return 'Hello world.'
},
})
app.mount('#app')
↑ ここまでの成果。ただのメッセージを画面に表示できているだけ...
html要素を表示できるようにしたい!
-> h関数 を作る
htmlを生成するJSの関数
h() is short for hyperscript - which means "JavaScript that produces HTML (hypertext markup language)". This name is inherited from conventions shared by many Virtual DOM implementations. A more descriptive name could be createVnode(), but a shorter name helps when you have to call this function many times in a render function.